'use strict';
let calculate_average = function(collection){

    let result=collection.reduce(function(pre,cur,index){
        if((index+1)%2==0) return pre+cur;
        else return pre+0;
    },0)
    return result/Math.floor(collection.length/2);
};
module.exports = calculate_average;
